<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>07-事件简写和事件对象$event</title>
    <script src="../js/vue.min.js"></script>
</head>
<body>
<div id="app">
    <pre>
        包含事件相关信息，如事件源、事件类型、偏移量
        target、type、offsetx
    </pre>
    <hr>
    <button v-on:click="show">click me</button>
    <button @click="show">click me</button>

    <hr>
    <button @click="printevent($event)">点击我</button>
</div>
<script>
    let vm = new Vue({
        el: "#app",
        data() {
            return {
                msg: 'hello world'
            }
        },
        methods: {
            show() {
                console.log(1111)
            },
            printevent(e) {
                console.log(e);
                console.log(e.target.innerHTML); //DOM对象
                console.log(this);

            }
        }
    })
</script>
</body>
</html>